using System.Collections.Generic;

namespace Book.Blog.Core.Entities
{
    public class Tag : BaseEntity
    {
        public required string Name { get; set; }
        public string? Description { get; set; }
        public required string Slug { get; set; }
        public int PostCount { get; set; }

        // 导航属性
        public virtual ICollection<Post> Posts { get; set; }

        public Tag()
        {
            Posts = new HashSet<Post>();
            PostCount = 0;
        }
    }
} 